/* Console example — various system commands

   This example code is in the Public Domain (or CC0 licensed, at your option.)

   Unless required by applicable law or agreed to in writing, this
   software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
   CONDITIONS OF ANY KIND, either express or implied.
*/
#pragma once

#ifdef __cplusplus
extern "C" {
#endif

// Register all system functions
void register_system(void);

// Register common system functions: "version", "restart", "free", "heap", "tasks"
void register_system_common(void);

// Register pll functions
void register_system_pll(void);

#ifdef __cplusplus
}
#endif

#define PLL_HOST    HSPI_HOST

#define PIN_NUM_MISO 22
#define PIN_NUM_MOSI 19
#define PIN_NUM_CLK  23
#define PIN_NUM_CS   18
#define PIN_NUM_RST  25
#define PIN_NUM_PD   34

#define script_len 64

typedef struct {
    uint8_t addr;
    uint8_t data;
    uint8_t hook; //No of data in data; bit 0 = flush READY; bit 1 = check after write; 0xFF = end of cmds.
} cmd_t;